In machinery which is automated, for example, machine tools, printers etc, it is well known to use line grating pairs as position indicating devices. Conventionally, the gratings are moved relative to each other while a light is shone through the gratings which creates an alternate light/dark bar pattern. The bar pattern is sensed by a detector such as a photocell placed on the opposite side of the gratings. Signals generated by the photocell then become a measure of the distance travelled by the grating, and if integrated over time also give a measure of the velocity of the relative motion between the grating pairs.
Such a conventional system has certain disadvantages. For example, it is difficult to position the gratings so that the lines of each grating are aligned properly in parallel relationship, and the grating surfaces themselves must be mounted close enough together to produce a sharp pattern. If there is any misalignment between the two gratings, the light/dark pattern will be fuzzy and the correct output will not be generated by the detector. The result of such misalignment or optical distortion results in missed signals which creates problems with regard to the machinery being controlled by the detector output. The tolerances between two moving line gratings must be held despite changes in atmospheric conditions, the normal wear of moving parts, and the all to real possibility of the gratings moving together and touching one another creating scratches or obliteration of one or more of the lines of the grating. Moreover, the risk of the gratings touching the optical parts creating damage on for example either the detector or the lens further creates a risk of improper generation of the dark and light patterns resulting in malfunctions and creating the possibility of replacing the rather expensive gratings.
In U.S. Pat. No. 3,524,067, issued on Aug. 11, 1970, a compact line grating position sensing device is disclosed, the device comprising a movable line grating with a source of illumination and a detector both mounted on the same side of the grating with means for deflecting and focusing the image of the grating produced by the illumination of the grating back on itself at a point in front of the detector. When the single grating is moved sideways relative to the light source and detector, in a direction perpendicular to the lines of the grating, interference between the grating and the image lines produces alternate illumination and non-illumination of the detector.
Similarly, in Japanese published patent application No. 11793/61, especially FIG. 3 thereof, an optical position sensing scheme is illustrated which includes a grating, and a light source and detector on the same side of the grating. An optical system which includes lenses and a prism reflects and focuses the grating line image produced by the source back upon the grating at a position opposite the detector. As disclosed therein, when the grating is moved relative to the source, the optical system and the detector and the grating line image produced by the source is superimposed on the grating at a position opposite the detector. Accordingly, interference occurs between the grating lines and the image lines to produce alternate illumination and non-illumination images to the detector. In this scheme, the lenses are apparently at a distance of twice the focal length because they are disposed so as to focus the grating line image onto the grating, while the prism is placed behind the lenses at a distance equal to the focal length. In U.S. Pat. No. 3,524,067 and Japanese published patent application 11793/61, the apparatus appears to be only capable of position sensing.
In U.S. Pat. No. 3,496,364 issued on Feb. 17, 1970, is disclosed a linear encoder having a fringe pattern produced by optical imaging. In this system, described in the aforementioned patent, a single ruled scale is illustrated utilizing an optical system which superimposes a rotated image of one portion of the scale upon a second portion of the scale, the image being rotated 180.degree. in the plane of the scale. Movement of the scale in one direction causes the image of the scale to move in the opposite direction. This results in light passing through the second portion of the scale being modulated by the relative movement between the scale rulings and the image of the rulings. By placing two or more photosensitive detectors at the second portion of the scale, the detectors being separated along a length of the scale by a distance suitable to produce out-of-phase electrical signals in response to light passing through the second portion of the scale, the sense of the phase of these signals is a representation of the direction of scale motion while the number of cycles of the signal is representative of the amount of scale motion. In this latter system, the phase information is obtained by generating a moire fringe pattern so that the pattern movement is at a speed or direction or both different than the movement of the encoder scale. This means, however, that some magnification of the image is necessary.
In IBM Technical Disclosure Bulletin, Vol. 20, No. 8, January 1978, pages 3199 and 3200 is disclosed a dynamic thresholding circuit which includes a positive and negative peak follower. The positive peak follower tracks the background level of a video signal while the negative peak follower tracks the maximum video information peaks which may reside in the black information level. A ratio divider of the two variable levels establishes the dynamic threshold level for the other input of a comparator which makes a binary decision as to whether the input signal is video or is background. A noise inhibiting circuit is included with an adjustable variable level output from the positive peak follower so as to provide a level clamp to the ratio divider thus clamping the video levels at a predetermined level below the background noise so as to form or provide a minimum ratio for the input comparator. While this circuit works in the required manner for frequency levels of signals which are relatively high, it will not operate properly at close to DC or DC levels or from a frequency range which is D.C. on up. Moreover, the voltage reference levels i.e., the peak level voltages do not necessarily increase so as embrace the signal swing of one cycle of the signal.
In view of the above, it is a principle object of the pesent invention to provide apparatus which will create a wave form output which is frequency dependent upon the signal input but which is insensitive to the output of a grating detector wherein the signal from the detector is varying in time and magnitude and in the presence of DC leakage.
Yet another object of the present invention is to provide a circuit for grating detector output signal detection which is relatively insensitive to "fuzz" on the signal input wave form so as to inhibit false detection and following of the voltage reference levels for both peaks and valleys thereof.
Yet another object of the present invention is to accomplish the above objects utilizing well known logic block functions which operate digitally so that the implementation cost of the circuitry is minimal in comparison, for example, with hand settable potentiometers and resistors.
Other objects and a more complete understanding of the invention may be had by referring to the following specification and claims taken in conjunction with the accompanying drawings in which: